﻿// /*
//  * @Author: wanyiming
//  * @Date:2024-05-21-20:36
//  * @Description:
//  */

using Code.Core.CoreBaseClass;
using Code.GameLogic.Map.Controller;
using QFramework;
using UnityEngine;

namespace Code.GameLogic.BaseClass
{
    public abstract class AbsGameLogicUI:BaseManager
    {
        public override IArchitecture GetArchitecture()
        {
            return MainApp.Interface;
        }

        public override void LoadManagerData()
        {
        }
        public override void CreateGameObj()
        {
        }
        public override void LoadComponent()
        {
        }
        public override void AfterLogic()
        {
        }

        protected C BindControllerToGo<T,C,M>(string goName,Transform parent,T bo,M manager) where C : AbsGameLogicController<T,M>
        {
            GameObject go = new GameObject(goName);
            go.transform.parent = parent;
            C controller = go.AddComponent<C>();
            controller.bo = bo;
            controller.manager = manager;
            controller.InitGo(bo);
            return controller;
        }

    }
    
}